package visualization.operators
{
	import model.metrics.Metric;
	
	import visualization.IDataPoint;
	import visualization.Visualization;
	
	public class InternalMetric extends Operator
	{
		public var metric:Metric = null;
		
		public function InternalMetric()
		{
			super();
		}
		
		override public function process(context:Visualization, element:IDataPoint=null):Object{
			if(this.metric!=null && element is Visualization){
				return (element as Visualization).getValue(this.metric);
			}
			return 0;
		}
	}
}